package org.wlgzs.shop.utils;

import java.util.Comparator;

/**
 * @Author: Ben
 * @Date: 2019/5/26 0:44
 * @Project org.wlgzs.shop
 */
public class ArraysUtils implements Comparator<Integer> {

    //Comparator是一个接口，所以这里我们自己定义的类MyComparator要implents该接口
 //而不是extends Comparator


         @Override
         public int compare(Integer a,Integer b){
             if(a<b){return 1;}
             else if(a>b){return -1;}
             else return 0;
         }
}

